feat(core): real mcp_tool/agent hook handlers + 2 final reminder types#25
Merged
Conversation
… types
· packages/core/src/hooks/dispatcher.ts:
- HookDispatcherOpts gains mcpToolDispatcher? and agentDispatcher?
callbacks. Host CLI wires these once MCP/sub-agents are loaded.
- mcp_tool case: dispatches when wired, includes the hook event+payload
as `arguments`; gracefully reports "no dispatcher" otherwise.
- agent case: dispatches when wired; same fallback message.
- Validates handler.server/tool/agent fields before dispatching.
· packages/core/src/reminders/index.ts:
- planModeActiveReminder — fires when ctx.mode === 'plan'; nudges
ExitPlanMode. Hooks into the 7-type plan.
- noTestYetReminder — fires when editsSinceTests > 0 and either no
lastTestRunAt or it's > 10min stale.
- ALL_TYPES and ReminderType union updated.
Tests: core 356 → 365 (+9: 5 reminder + 4 hook); cli 47 unchanged.
Total 403 → 412.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hook dispatcher gains mcpToolDispatcher + agentDispatcher callbacks (host CLI wires them). 2 new reminders (plan-mode-active, no-test-yet) complete the 7-type plan. 412 passing.